public class MyClass {
    public static void main(String[] args) {

        Color c1 = Color.RED;
        System.out.println(c1);
        for (Color myVar : Color.values()) {
            System.out.println(myVar);
        }

    //    -----------------------------

        System.out.println("-----------------------------");
        Color myVar = Color.BLUE;

        switch(myVar) {
            case RED:
                System.out.println("红色");
                break;
            case GREEN:
                System.out.println("绿色");
                break;
            case BLUE:
                System.out.println("蓝色");
                break;
        }

    }
}

enum Color {
    RED, GREEN, BLUE;
}


//class Color
//{
//    public static final Color RED = new Color();
//    public static final Color BLUE = new Color();
//    public static final Color GREEN = new Color();
//}
